package com.csaba.account.overview;

import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.Viewer;

public class LastTransactionsContentProvider implements IStructuredContentProvider
{

	public static Transaction[][] lastTransactions = new Transaction[][] {
			new Transaction[] { new Transaction("2007.10.29", "687318", "Account Maintenance Fee", "-100", "HUF"),
					new Transaction("2007.10.16", "887211", "Credit Card Withdrawal", "-99900", "HUF"),
					new Transaction("2007.10.10", "334236", "Salary", "100000", "HUF"), },
			new Transaction[] { new Transaction("2007.10.29", "687318", "Account Maintenance Fee", "-100", "HUF"),
					new Transaction("2007.10.16", "887211", "Credit Card Withdrawal", "-99900", "HUF"),
					new Transaction("2007.10.10", "334236", "Salary", "100000", "HUF"), },
			new Transaction[] { new Transaction("2007.10.28", "687318", "Account Maintenance Fee", "-100", "HUF"),
					new Transaction("2007.10.26", "887211", "Credit Card Withdrawal", "-900", "HUF"),
					new Transaction("2007.10.26", "334236", "Credit Card Withdrawal", "-10000", "HUF"),
					new Transaction("2007.10.22", "687318", "Credit Card Withdrawal", "-46200", "HUF"),
					new Transaction("2007.10.16", "887211", "Credit Card Withdrawal", "-99900", "HUF"),
					new Transaction("2007.10.10", "334236", "Credit Card Withdrawal", "-60000", "HUF"),
					new Transaction("2007.10.08", "687318", "Credit Card Withdrawal", "-20000", "HUF"),
					new Transaction("2007.10.08", "887211", "Credit Card Withdrawal", "-99900", "HUF"),
					new Transaction("2007.10.04", "334236", "Columbian Drug Money", "600000", "HUF"),
					new Transaction("2007.10.01", "334236", "Salary", "100000", "HUF"), },
			new Transaction[] { new Transaction("2007.10.29", "687318", "Account Maintenance Fee", "-100", "HUF"),
					new Transaction("2007.10.16", "887211", "Credit Card Withdrawal", "-99900", "HUF"),
					new Transaction("2007.10.10", "334236", "Salary", "100000", "HUF"), }, };

	@Override
	public Object[] getElements( Object arg0 )
	{
		// Gagyi, tudom
		if ( arg0 == AccountsContentProvider.accounts[0] )
		{
			return lastTransactions[0];
		}
		else if ( arg0 == AccountsContentProvider.accounts[1] )
		{
			return lastTransactions[1];
		}
		else if ( arg0 == AccountsContentProvider.accounts[2] )
		{
			return lastTransactions[2];
		}
		else
		{
			return lastTransactions[3];
		}
	}

	@Override
	public void dispose()
	{
	}

	@Override
	public void inputChanged( Viewer arg0, Object arg1, Object arg2 )
	{
	}
}
